package com.jinwei.qunguanjia.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 读取项目相关配置
 *
 * @author yuanzs
 */
@Component
@ConfigurationProperties(prefix = "qunguanjia")
public class QunguanjiaConfig {

    /** 获取地址开关 */
    private static boolean addressEnabled;

    /** 验证码类型 */
    private static String captchaType;

    /** 管理员id */
    private static String adminUserId;

    /** 管理员角色id */
    private static String adminRoleId;

    public static boolean isAddressEnabled() {
        return addressEnabled;
    }

    public void setAddressEnabled(boolean addressEnabled) {
        QunguanjiaConfig.addressEnabled = addressEnabled;
    }

    public void setCaptchaType(String captchaType) {
        QunguanjiaConfig.captchaType = captchaType;
    }

    public static String getCaptchaType() {
        return captchaType;
    }

    public static String getAdminUserId() {
        return adminUserId;
    }

    public void setAdminUserId(String adminUserId) {
        QunguanjiaConfig.adminUserId = adminUserId;
    }

    public static String getAdminRoleId() {
        return adminRoleId;
    }

    public void setAdminRoleId(String adminRoleId) {
        QunguanjiaConfig.adminRoleId = adminRoleId;
    }
}
